package com.wufeng.model.SpringBootModel.other;

import java.util.HashSet;
import java.util.Set;

public class Demo {
    private String first;
    private String last;

    public Demo(String first, String last) {
        this.first = first;
        this.last = last;
    }

    @Override
    public boolean equals(Object o) {
        Demo demo = (Demo) o;
        return demo.last.equals(first) && demo.last.equals(last);
    }

    public static void main(String[] args) {
        Set<Demo> set = new HashSet<>();
        set.add(new Demo("li", "si"));
        System.out.println(set.contains(new Demo("li", "si")));


    }

    public String reverseString(String str) {
        return str;
    }
}
